home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
center2g
/
frmperfe.frm
next >
Wrap
Text File
|
1999-09-01
|
8KB
|
224 lines
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frmPerfExplorer
Caption = "Winnt Performance Monitor"
ClientHeight = 5085
ClientLeft = 1905
ClientTop = 1620
ClientWidth = 7290
LinkTopic = "Form1"
ScaleHeight = 5085
ScaleWidth = 7290
Begin ComctlLib.StatusBar StatusBar
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 1
Top = 4770
Width = 7290
_ExtentX = 12859
_ExtentY = 556
Style = 1
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
EndProperty
End
Begin VB.Timer SampleTimer
Enabled = 0 'False
Interval = 2000
Left = 7500
Top = 720
End
Begin ComctlLib.ListView ListView
Height = 4755
Left = 0
TabIndex = 0
Top = 0
Width = 7275
_ExtentX = 12832
_ExtentY = 8387
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
_Version = 327682
Icons = "ImageList"
SmallIcons = "ImageList"
ForeColor = -2147483640
BackColor = -2147483643
Appearance = 1
NumItems = 17
BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Text = "Computer"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Alignment = 1
SubItemIndex = 1
Key = ""
Object.Tag = ""
Text = "Processor"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Alignment = 1
SubItemIndex = 2
Key = ""
Object.Tag = ""
Text = "Memory"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Alignment = 1
SubItemIndex = 3
Key = ""
Object.Tag = ""
Text = "Up Time"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(5) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 4
Key = ""
Object.Tag = ""
Text = "5"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(6) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 5
Key = ""
Object.Tag = ""
Text = "6"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(7) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 6
Key = ""
Object.Tag = ""
Text = "7"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(8) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 7
Key = ""
Object.Tag = ""
Text = "8"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(9) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 8
Key = ""
Object.Tag = ""
Text = "9"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(10) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 9
Key = ""
Object.Tag = ""
Text = "10"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(11) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 10
Key = ""
Object.Tag = ""
Text = "11"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(12) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 11
Key = ""
Object.Tag = ""
Text = "12"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(13) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 12
Key = ""
Object.Tag = ""
Text = "13"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(14) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 13
Key = ""
Object.Tag = ""
Text = "141"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(15) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 14
Key = ""
Object.Tag = ""
Text = "15"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(16) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 15
Key = ""
Object.Tag = ""
Text = "16"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(17) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 16
Key = ""
Object.Tag = ""
Text = "17"
Object.Width = 2540
EndProperty
End
End
Attribute VB_Name = "frmPerfExplorer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mbMoving As Boolean
Const sglSplitLimit = 500
Private Sub Form_Resize()
ListView.Move 0, 0, Me.ScaleWidth, Abs(Me.ScaleHeight - StatusBar.Height - 30)
End Sub
Private Sub Form_Load()
Me.Show
Set List = ListView
If PdhOpen Then
AddComputer "10.237.169.91"
'AddComputer "ComputerName 2"
'AddComputer "ComputerName 3"
'AddComputer "ComputerName n"
SampleTimer.Enabled = True
Else
MsgBox "Error opening PDH: " & PdhLastError
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
SampleTimer.Enabled = False
DoEvents
If Not PdhClose Then
MsgBox "Error closing PDH: " & PdhLastError
End If
End
End Sub
Private Sub SampleTimer_Timer()
Call TakeSample
End Sub